Use subdomain URLs for hexpm package docs#1172
Merged
Merged
Conversation
Switch hexpm-repo docs URLs from `https://hexdocs.pm/PACKAGE/...` to `https://PACKAGE.hexdocs.pm/...`. Org-repo URLs are unchanged.
Hex package names allow underscores. RFC 1123 hostname labels and RFC 6125 wildcard SAN matching don't, and Fastly enforces strict SAN matching at the HTTP edge — phoenix_live_view.hexdocs.pm returns 421 'Misdirected Request' even though the wildcard cert covers *.hexdocs.pm. The Fastly Compute subdomain handler reverses the mapping before the GCS bucket key lookup so canonical hex names continue to be the storage key. Apply the same mapping in the Hex CLI helpers that emit hexpm-repo subdomain URLs. Org-repo branch is unchanged (hexorgs.pm is GKE and doesn't enforce strict SAN matching).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Switch hexpm-repo docs URLs the CLI emits from
https://hexdocs.pm/PACKAGE/...tohttps://PACKAGE.hexdocs.pm/.... Org-repo URLs (*.hexorgs.pm) are unchanged.Phase 3 of the hexdocs subdomain migration. The apex
https://hexdocs.pm/PACKAGE/...URLs continue to work via a 301 to the subdomain (Hex.HTTPfollows up to 3 redirects), so pre-existing CLIs are unaffected.Changes:
lib/hex/utils.ex— fourhexdocs_url/hexdocs_module_urlhexpm-repo clauses switched to subdomain form.lib/mix/tasks/hex.search.ex—document_url/2per-result URL switched to subdomain form. The apex search-landing-page URL (https://hexdocs.pm/?packages=...&q=) is unchanged; the search page lives at the apex.lib/mix/tasks/hex.publish.ex— docstring updated to describe new URL scheme.lib/hex/scm.ex— doc-link comment updated for consistency.